/*
 * Created: 2022-08-27 15:27:44
 * Author : 涛涛涛
 */

import React, { FC } from 'react';
import { View, Text, Image } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
export interface IProps extends ICompProps {
    title: string;
    iconUrl: string;
}
HeadTitle.defaultProps = {} as Partial<IProps>;
function HeadTitle(props: IProps) {
    const { className, style, title, iconUrl } = props;
    const localClassName = useClassName('HeadTitle', className);
    return (
        <RootView className={localClassName} style={style}>
            <Image className="icon" src={iconUrl}></Image>
            <View className="word">{title}</View>
        </RootView>
    );
}
export default React.memo(HeadTitle as FC<IProps>);
const RootView = styled(View)`
    &.HeadTitle {
        padding: 50px 45px;
        display: flex;
        align-items: center;
        .icon {
            display: block;
            width: 35px;
            height: 28px;
        }
        .word {
            margin-left: 20px;
            color: #363636;
            font-size: 26px;
            font-weight: 600;
        }
    }
`;
